import Vue from 'vue';
import App from './App.vue';
import router from './router';
// 按需引入element UI
import './plugins/element.js';
// 导入全局样式表
import './assets/css/global.css';
// 引入Mock
require('./mock/mock.js');

// 进度条
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';

import axios from 'axios';

axios.interceptors.request.use((config) => {
  NProgress.start();
  return config;
});

axios.interceptors.response.use((config) => {
  NProgress.done();
  return config;
});

Vue.prototype.$http = axios;

Vue.config.productionTip = false;

new Vue({
  router,
  render: (h) => h(App),
}).$mount('#app');
